import React, { Component } from 'react'

export default class Left extends Component {
  state={
    msg:'我是left中的数据'
  }
  sendMsgToParent=()=>{
    this.props.callback(this.state.msg)
  } 
  render() {
    return (
      <div style={{flexGrow:1,backgroundColor:'orange',height:'100vh'}}>
        <h1>Left组件</h1>
        <button onClick={this.sendMsgToParent}>发送数据到Right组件</button>
      </div>
    )
  }
}
